package com.demo.wrapper;

import co.elastic.clients.elasticsearch._types.aggregations.Aggregation;
import co.elastic.clients.util.ObjectBuilder;
import com.demo.wrapper.interfaces.ICustomBuildAggWrapper;
import com.demo.wrapper.interfaces.IEsLimitWrapper;

import java.util.function.Function;

/**
 * 聚合拼接器
 *
 * @param <Wrapper> 条件拼接类
 * @author 19242
 */
public class EsAggWrapper<Wrapper extends IEsLimitWrapper<Wrapper, EsAggWrapper<Wrapper>>> extends AbstractEsAggWrapper<EsAggWrapper<Wrapper>, Wrapper>
        implements ICustomBuildAggWrapper<EsAggWrapper<Wrapper>, Wrapper, Function<Aggregation.Builder, ObjectBuilder<Aggregation>>> {
    @Override
    public EsAggWrapper<Wrapper> instanceChild() {
        return new EsAggWrapper<>();
    }

}
